{
	"info": {
		"_postman_id": "6833573d-3cb1-4843-a357-8555ef3036e0",
		"name": "Протокол 1.3 Биопсия",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "37937048"
	},
	"item": [
		{
			"name": "Кейс 1. Взятие биологического материала, направление на гистологическое исследование в рамках оперативного вмешательства",
			"item": [
				{
					"name": "предварительные условия",
					"item": [
						{
							"name": "импорт пакета медицинской информации",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
											"    pm.response.to.have.status(202);\r",
											"});\r",
											"\r",
											"var jsonData = pm.response.json();\r",
											"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
											"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
											"\r",
											"console.log(statusReference.valueReference.reference);\r",
											"\r",
											"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
											"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											"// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
											"\r",
											"// var requestdata = JSON.parse(pm.request.body.raw);\r",
											"// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
											"// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
											"\r",
											"// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
											"// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
											"// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
											"\r",
											"// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
											"// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
											"// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
											"// // --- Patient ----\r",
											"// let patientName = patient.name[0].family;\r",
											"// let patientDate = patient.birthDate;\r",
											"// let patientAddress = patient.address[0];\r",
											"// let patientIdentifier = patient.identifier[0];\r",
											"\r",
											"// console.log(pm.request.auth)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "X-Fhir-By-Version",
										"value": "active",
										"type": "text"
									},
									{
										"key": "X-Fhir-By-Version",
										"value": "latest",
										"type": "text",
										"disabled": true
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551317A009PB4\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB77708\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        }\r\n    ]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"$import"
									]
								}
							},
							"response": []
						},
						{
							"name": "получение статуса импорта пакета медицинской информации",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Bundle",
										"{{bundleId}}",
										"$status"
									]
								}
							},
							"response": []
						},
						{
							"name": "поиск пациента по идентификационному номеру",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"var jsonData = pm.response.json();\r",
											"let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
											"\r",
											"pm.collectionVariables.set(\"patientId\", patientId);\r",
											"console.log(patientId)\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [],
								"body": {
									"mode": "raw",
									"raw": "",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7551317A009PB4",
									"protocol": "{{Schema}}",
									"host": [
										"{{Proxy-host}}"
									],
									"path": [
										"fhir",
										"Patient"
									],
									"query": [
										{
											"key": "identifier",
											"value": "7551317A009PB4"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "импорт данных",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
									"    pm.response.to.have.status(202);\r",
									"});\r",
									"\r",
									"var jsonData = pm.response.json();\r",
									"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
									"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
									"\r",
									"console.log(statusReference.valueReference.reference);\r",
									"\r",
									"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
									"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "active",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleSurgery1Test\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3086\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-11-18T16:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionSurgery1Test\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionSurgery1Test\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-11-18T16:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle по оперативному вмешательству\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/AcuteAppendicitisClinicalTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ServiceRequest/ExampleSRPathohistologyAppendixTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Specimen/ExampleSpecimeAppendixBiopsyTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"EpisodeOfCare/ExampleHospitalisation2.2Test\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Procedure/AppendectomyTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551317A009PB4\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB77708\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"EpisodeOfCare/ExampleHospitalisation2.2Test\",\r\n            \"resource\": {\r\n                \"resourceType\": \"EpisodeOfCare\",\r\n                \"id\": \"ExampleHospitalisation2.2Test\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/Hospitalisation\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/HospitalisationPaidType\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/HospitalisationPaidType\",\r\n                                            \"code\": \"govern\",\r\n                                            \"display\": \"за счет бюджетных средств\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/HospitalisationPaid\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EmergencyHospitalisationTerm\",\r\n                        \"valuePositiveInt\": 6\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/HepatitisBool\",\r\n                        \"valueBoolean\": false\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DiagnosisOfSendingOrganisation\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Condition/AcuteAppendicitisClinicalTest\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SequenceNumbeHospitalisation\",\r\n                        \"valuePositiveInt\": 1\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"12/1\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"active\",\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"hightechnology\",\r\n                                \"display\": \"Высокотехнологичная медицинская помощь\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/HospitalisationReasonUse\",\r\n                                    \"code\": \"2\",\r\n                                    \"display\": \"Экстренная госпитализация\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": [\r\n                            {\r\n                                \"concept\": {\r\n                                    \"text\": \"Для уточнения диагноза и лечения\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfDiagnosis\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                                    \"code\": \"mainDiagnosis\",\r\n                                                    \"display\": \"Основной диагноз\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/AcuteAppendicitisClinicalTest\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Preliminary\",\r\n                                    \"display\": \"Предварительный диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfDiagnosis\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                                    \"code\": \"mainDiagnosis\",\r\n                                                    \"display\": \"Основной диагноз\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/AcuteAppendicitisClinicalTest\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Clinical\",\r\n                                    \"display\": \"Клинический диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"patient\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"managingOrganization\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"period\": {\r\n                    \"start\": \"2025-11-15\"\r\n                },\r\n                \"careManager\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/AcuteAppendicitisClinicalTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"AcuteAppendicitisClinicalTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-11-16T15:15:00Z\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/CourseOfDisease\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/CourseOfDisease\",\r\n                                    \"code\": \"acute\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"K35.3\",\r\n                            \"display\": \"K35.3 - Острый аппендицит с ограниченным перитонитом\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"onsetDateTime\": \"2025-11-16\",\r\n                \"recordedDate\": \"2025-11-16\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Клинический диагноз. Острый флегмонозный аппендицин. Местный серозно-фибринозный перитонит.\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ServiceRequest/ExampleSRPathohistologyAppendixTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ServiceRequest\",\r\n                \"id\": \"ExampleSRPathohistologyAppendixTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                   \r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SpecialtyCode\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ServiceSpecialtyBy\",\r\n                                    \"code\": \"C018\",\r\n                                    \"display\": \"Лабораторная диагностика\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/ShortClinicalData\",\r\n                                        \"valueString\": \"Острый флегмонозный аппендицит, проведена аппендэктомия\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PathoHistology\"\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfResearch\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PurposeOfResearch\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PurposeOfResearch\",\r\n                                    \"code\": \"primary-research\",\r\n                                    \"display\": \"первичное исследование\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"75862\"\r\n                    }\r\n                ],\r\n                \"status\": \"active\",\r\n                \"intent\": \"directive\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/2\",\r\n                                \"display\": \"Стационарная медицинская диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": \"routine\",\r\n                \"code\": {\r\n                    \"concept\": {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ResearchMethods\",\r\n                                \"code\": \"patho-histology\",\r\n                                \"display\": \"Патогистологическое исследование\"\r\n                            }\r\n                        ]\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"authoredOn\": \"2025-11-15T14:00:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"location\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Location/{{LocationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/AcuteAppendicitisClinicalTest\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"specimen\": [\r\n                    {\r\n                        \"reference\": \"Specimen/ExampleSpecimeAppendixBiopsyTest\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Specimen/ExampleSpecimeAppendixBiopsyTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Specimen\",\r\n                \"id\": \"ExampleSpecimeAppendixBiopsyTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/BioMatSpecimen\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"2456.2025\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSBiologicalMaterial\",\r\n                            \"code\": \"12.12.15\",\r\n                            \"display\": \"Иной материал\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"collection\": {\r\n                    \"procedure\": {\r\n                        \"reference\": \"Procedure/AppendectomyTest\"\r\n                    },\r\n                    \"bodySite\": {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AnatomicalTerminology\",\r\n                                    \"code\": \"Vermiform-appendix\",\r\n                                    \"display\": \"Червеобразный отросток\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                },\r\n                \"processing\": [\r\n                    {\r\n                        \"method\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ColoringMicropreparations\",\r\n                                    \"code\": \"Native\",\r\n                                    \"display\": \"Не окрашивался\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"condition\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/StateOfSpecimen\",\r\n                                \"code\": \"COOL\",\r\n                                \"display\": \"Охлажденный\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Procedure/AppendectomyTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Procedure\",\r\n                \"id\": \"AppendectomyTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/SurgicalProcedure\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\",\r\n                                    \"display\": \"Бесплатные услуги\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/TermsOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                    \"code\": \"2\",\r\n                                    \"display\": \"стационарные\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/InpatientMedicalRecord\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"EpisodeOfCare/ExampleHospitalisation2.2Test\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AnesthesiaType\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AnesthesiaType\",\r\n                                    \"code\": \"endotracheal\",\r\n                                    \"display\": \"Эндотрахеальный наркоз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ProcedureComplexity\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ProcedureComplexity\",\r\n                                    \"code\": \"complex\",\r\n                                    \"display\": \"Сложное\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ProcedureUrgency\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ProcedureUrgency\",\r\n                                    \"code\": \"emergency\",\r\n                                    \"display\": \"Экстренное\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"13582\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ProcedureType\",\r\n                                \"code\": \"radical\",\r\n                                \"display\": \"Радикальная\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/SurgicalInterventions\",\r\n                            \"code\": \"JESA10\",\r\n                            \"display\": \"Аппендэктомия с дренированием брюшной полости\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"Аппендэктомия с дренированием брюшной полости\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"occurrencePeriod\": {\r\n                    \"start\": \"2025-11-16T12:00:00Z\",\r\n                    \"end\": \"2025-11-16T13:20:00Z\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"operator\",\r\n                                    \"display\": \"врач-хирург оперирующий\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        },\r\n                        \"period\": {\r\n                            \"start\": \"2025-11-16T12:00:00Z\",\r\n                            \"end\": \"2025-11-16T13:20:00Z\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"surgical-sister\",\r\n                                    \"display\": \"медицинская сестра операционная\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        },\r\n                        \"period\": {\r\n                            \"start\": \"2025-11-16T12:00:00Z\",\r\n                            \"end\": \"2025-11-16T13:20:00Z\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"anesthetist\",\r\n                                    \"display\": \"врач-анестезиолог-реаниматолог\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        },\r\n                        \"period\": {\r\n                            \"start\": \"2025-11-16T12:00:00Z\",\r\n                            \"end\": \"2025-11-16T13:20:00Z\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"location\": {\r\n                    \"reference\": \"Location/{{LocationId}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SurgicalInterventionDiagnosis\",\r\n                                    \"code\": \"postoperative\",\r\n                                    \"display\": \"Диагноз после вмешательства\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/AcuteAppendicitisClinicalTest\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"После обработки операционного поля выполнен срединный лапаротомный доступ. В брюшной полости - мутный экссудат, фибринозные наложения. Выделен и удалён деструктивно изменённый червеобразный отросток. Культя обработана. Произведена санация брюшной полости теплым антисептическим раствором. Отросток направлен на гистологическое исследование. В брюшную полость установлен дренаж (№ DR-111) для контроля экссудата. Рана послойно ушита. Асептическая повязка. Кровопотеря - около 100 мл. Осложнений во время операции не отмечено.\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Bundle",
								"$import"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод получения статуса операции импорта пакета медицинской информации",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$status"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия у пациента процедур эндоскопического исследования",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let ProcedureId = jsonData.entry.find(obj => obj.resource.resourceType === \"Procedure\").resource.id;\r",
									"\r",
									"pm.collectionVariables.set(\"ProcedureId\", ProcedureId);\r",
									"console.log(ProcedureId)"
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Procedure?_profile=https://fhir.by/StructureDefinition/SurgicalProcedure&patient={{patientId}}",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Patient",
								"{{patientId}}",
								"Procedure"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/SurgicalProcedure"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия ресурсов госпитализации",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let episodOfCareId = jsonData.entry.find(obj => obj.resource.resourceType === \"EpisodeOfCare\").resource.id;\r",
									"\r",
									"pm.collectionVariables.set(\"episodOfCareId\", episodOfCareId);\r",
									"console.log(episodOfCareId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/EpisodeOfCare?_profile=https://fhir.by/StructureDefinition/Hospitalisation&patient={{patientId}}&_sort=-_lastUpdated",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Patient",
								"{{patientId}}",
								"EpisodeOfCare"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/Hospitalisation"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия у пациента направления на исследование образца",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let resourceId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
									"\r",
									"pm.collectionVariables.set(\"serviceRequestResearchId\", resourceId);\r",
									"console.log(resourceId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch&patient={{patientId}}",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Patient",
								"{{patientId}}",
								"ServiceRequest"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия образца",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let resourceId = jsonData.entry.find(obj => obj.resource.resourceType === \"Specimen\").resource.id;\r",
									"\r",
									"pm.collectionVariables.set(\"specimenId\", resourceId);\r",
									"console.log(resourceId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Specimen?_profile=https://fhir.by/StructureDefinition/BioMatSpecimen&patient={{patientId}}",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Patient",
								"{{patientId}}",
								"Specimen"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/BioMatSpecimen"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Кейс 2. Гистологическое заключение",
			"item": [
				{
					"name": "импорт данных",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
									"    pm.response.to.have.status(202);\r",
									"});\r",
									"\r",
									"var jsonData = pm.response.json();\r",
									"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
									"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
									"\r",
									"console.log(statusReference.valueReference.reference);\r",
									"\r",
									"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
									"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "active",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleHystologyAppendixFromLabTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3086\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-11-16T17:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionHystoFromLabTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionHystoFromLabTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-11-16T17:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle для гистологического заключения\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"DiagnosticReport/ExamplePathohistologyReportTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551317A009PB4\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB77708\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"DiagnosticReport/ExamplePathohistologyReportTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"DiagnosticReport\",\r\n                \"id\": \"ExamplePathohistologyReportTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DiagnosticReportBioMatResearch\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"143.2025\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"basedOn\": [\r\n                    {\r\n                        \"reference\": \"ServiceRequest/{{serviceRequestResearchId}}\"\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/2\",\r\n                                \"display\": \"Стационарная медицинская диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/ResearchMethodsTypeA\",\r\n                            \"code\": \"A08-18-001\",\r\n                            \"display\": \"Морфологическое исследование препарата тканей толстой кишки\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"issued\": \"2025-11-16T13:00:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"resultsInterpreter\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                    }\r\n                ],\r\n                \"specimen\": [\r\n                    {\r\n                        \"reference\": \"Specimen/{{specimenId}}\"\r\n                    }\r\n                ],\r\n                \"conclusion\": \"Острый флегмонозный аппендицит.\",\r\n                \"conclusionCode\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MicroscopicDescription\",\r\n                                \"valueString\": \"Диффузное трансмуральное воспаление с массивной нейтрофильной инфильтрацией всех слоев стенки (от слизистой до серозной оболочки)\"\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ResearchMethods\",\r\n                                \"code\": \"patho-histology\",\r\n                                \"display\": \"Патогистологическое исследование\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Bundle",
								"$import"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод получения статуса операции импорта пакета медицинской информации",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$status"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия у пациента направления на исследование образца",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let resourceId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
									"\r",
									"pm.collectionVariables.set(\"serviceRequestResearchId\", resourceId);\r",
									"console.log(resourceId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch&patient={{patientId}}&_sort=-_lastUpdated",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Patient",
								"{{patientId}}",
								"ServiceRequest"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия заключения",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let resourceId = jsonData.entry.find(obj => obj.resource.resourceType === \"Specimen\").resource.id;\r",
									"\r",
									"pm.collectionVariables.set(\"specimenId\", resourceId);\r",
									"console.log(resourceId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/DiagnosticReport?_profile=https://fhir.by/StructureDefinition/DiagnosticReportBioMatResearch&patient={{patientId}}",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Patient",
								"{{patientId}}",
								"DiagnosticReport"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/DiagnosticReportBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								}
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "Кейс 3. \tВзятие биологического материала, направление на гистологическое исследование в рамках эндоскопического вмешательства",
			"item": [
				{
					"name": "импорт данных",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
									"    pm.response.to.have.status(202);\r",
									"});\r",
									"\r",
									"var jsonData = pm.response.json();\r",
									"let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
									"let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
									"\r",
									"console.log(statusReference.valueReference.reference);\r",
									"\r",
									"pm.collectionVariables.set(\"bundleId\", bundleId);\r",
									"pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "X-Fhir-By-Version",
								"value": "active",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundleSurgery1Test\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3086\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-11-18T16:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionSurgery1Test\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionSurgery1Test\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-11-18T16:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle по оперативному вмешательству\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisrEndoscopy3\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ServiceRequest/ExampleSRPathohistologyAppendixTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Specimen/ExampleSpecimeAppendixBiopsyTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"EpisodeOfCare/ExampleHospitalisation2.2Test\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Procedure/ExampleEndoscopyColonoscopyTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientEndoscopy\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-11-17T11:30:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"3_group\",\r\n                                    \"display\": \"III группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"ch-general\",\r\n                                    \"display\": \"вследствие общего заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО Экономика\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Экономист\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"ОАО СтройВозводи\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"БГУ, экономический факультет\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2011-09-01\",\r\n                                    \"end\": \"2015-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientStudyPlace\",\r\n                                \"valueString\": \"ГБУ, факультет программирования\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTermOfStudy\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2015-09-01\",\r\n                                    \"end\": \"2018-07-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientStudy\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientPreferences\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSPatientPreferences\",\r\n                                    \"code\": \"6\",\r\n                                    \"display\": \"Дети-инвалиды в возрасте до 18 лет и дети в возрасте до 3 лет.\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-08-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551446A009PB3\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1985-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 31.12.1985\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"106\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"AB7770\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-01-31\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Алексеев\",\r\n                        \"given\": [\r\n                            \"Василий\",\r\n                            \"Петрович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"80290000000\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@mail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1985-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"use\": \"home\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Независимости д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    },\r\n                    {\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"РБ, г. Минск, пр-т Победителей д.28, кв.101\",\r\n                        \"city\": \"Minsk city\",\r\n                        \"state\": \"Minskaya oblast\",\r\n                        \"country\": \"Belarus\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"EpisodeOfCare/ExampleHospitalisation2.2Test\",\r\n            \"resource\": {\r\n                \"resourceType\": \"EpisodeOfCare\",\r\n                \"id\": \"ExampleHospitalisation2.2Test\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/Hospitalisation\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/HospitalisationPaidType\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/HospitalisationPaidType\",\r\n                                            \"code\": \"govern\",\r\n                                            \"display\": \"за счет бюджетных средств\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/HospitalisationPaid\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EmergencyHospitalisationTerm\",\r\n                        \"valuePositiveInt\": 6\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/HepatitisBool\",\r\n                        \"valueBoolean\": false\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DiagnosisOfSendingOrganisation\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Condition/ExampleDiagnosisrEndoscopy3\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SequenceNumbeHospitalisation\",\r\n                        \"valuePositiveInt\": 1\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"12/1\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"active\",\r\n                \"type\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/TypeOfHealthCare\",\r\n                                \"code\": \"hightechnology\",\r\n                                \"display\": \"Высокотехнологичная медицинская помощь\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/HospitalisationReasonUse\",\r\n                                    \"code\": \"2\",\r\n                                    \"display\": \"Экстренная госпитализация\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": [\r\n                            {\r\n                                \"concept\": {\r\n                                    \"text\": \"Для уточнения диагноза и лечения\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"diagnosis\": [\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfDiagnosis\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                                    \"code\": \"mainDiagnosis\",\r\n                                                    \"display\": \"Основной диагноз\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisrEndoscopy3\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Preliminary\",\r\n                                    \"display\": \"Предварительный диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"condition\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfDiagnosis\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/TypeOfDiagnosis\",\r\n                                                    \"code\": \"mainDiagnosis\",\r\n                                                    \"display\": \"Основной диагноз\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/ExampleDiagnosisrEndoscopy3\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"use\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Clinical\",\r\n                                    \"display\": \"Клинический диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"patient\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"managingOrganization\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"period\": {\r\n                    \"start\": \"2025-11-15\"\r\n                },\r\n                \"careManager\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/ExampleDiagnosisrEndoscopy3\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"ExampleDiagnosisrEndoscopy3\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\",\r\n                                    \"display\": \"Заключительный диагноз\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-11-15\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/CourseOfDisease\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/CourseOfDisease\",\r\n                                    \"code\": \"acute\",\r\n                                    \"display\": \"Острое течение заболевания\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FirstTimeRevealed\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"K63.5\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"K63.5 - Полип ободочной кишки\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"onsetDateTime\": \"2025-11-15\",\r\n                \"recordedDate\": \"2025-11-15\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Полип ободочной кишки\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ServiceRequest/ExampleSRPathohistologyAppendixTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ServiceRequest\",\r\n                \"id\": \"ExampleSRPathohistologyEndoScTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/ShortClinicalData\",\r\n                                        \"valueString\": \"Полип на ножке нисходящей ободочной кишке\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PathoHistology\"\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/TypeOfResearch\"\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SpecialtyCode\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ServiceSpecialtyBy\",\r\n                                    \"code\": \"C018\",\r\n                                    \"display\": \"Лабораторная диагностика\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PurposeOfResearch\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PurposeOfResearch\",\r\n                                    \"code\": \"primary-research\",\r\n                                    \"display\": \"первичное исследование\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"758614\"\r\n                    }\r\n                ],\r\n                \"status\": \"active\",\r\n                \"intent\": \"directive\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"03/2\",\r\n                                \"display\": \"Стационарная медицинская диагностика для взрослого населения\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"priority\": \"routine\",\r\n                \"code\": {\r\n                    \"concept\": {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ResearchMethods\",\r\n                                \"code\": \"patho-histology\",\r\n                                \"display\": \"Патогистологическое исследование\"\r\n                            }\r\n                        ]\r\n                    }\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"authoredOn\": \"2025-11-15T14:00:00Z\",\r\n                \"requester\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\"\r\n                    }\r\n                ],\r\n                \"location\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Location/{{LocationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/ExampleDiagnosisrEndoscopy3\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"specimen\": [\r\n                    {\r\n                        \"reference\": \"Specimen/ExampleSpecimeAppendixBiopsyTest\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Specimen/ExampleSpecimeAppendixBiopsyTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Specimen\",\r\n                \"id\": \"ExampleSpecimeEndoScBiopsyTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/BioMatSpecimen\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"2450.2025\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/d472b8d6-5c80-4dfb-ad09-c5ce8596d5e9\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSBiologicalMaterial\",\r\n                            \"code\": \"12.12.15\",\r\n                            \"display\": \"Иной материал\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"collection\": {\r\n                    \"procedure\": {\r\n                        \"reference\": \"Procedure/ExampleEndoscopyColonoscopyTest\"\r\n                    },\r\n                    \"bodySite\": {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AnatomicalTerminology\",\r\n                                    \"code\": \"Descending-colon\",\r\n                                    \"display\": \"Нисходящая ободочная кишка\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                },\r\n                \"processing\": [\r\n                    {\r\n                        \"method\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ColoringMicropreparations\",\r\n                                    \"code\": \"Native\",\r\n                                    \"display\": \"Не окрашивался\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"condition\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/StateOfSpecimen\",\r\n                                \"code\": \"COOL\",\r\n                                \"display\": \"Охлажденный\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Procedure/ExampleEndoscopyColonoscopyTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Procedure\",\r\n                \"id\": \"ExampleEndoscopyColonoscopyTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/SurgicalProcedure\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/FromOrganization\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/EncounterTypeOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/EncounterTypeOfService\",\r\n                                    \"code\": \"free\",\r\n                                    \"display\": \"Бесплатные услуги\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/TermsOfService\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/VSTermsOfService\",\r\n                                    \"code\": \"2\",\r\n                                    \"display\": \"стационарные\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/InpatientMedicalRecord\",\r\n                        \"valueReference\": {\r\n                            \"reference\": \"EpisodeOfCare/ExampleHospitalisation2.2Test\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AnesthesiaType\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/AnesthesiaType\",\r\n                                    \"code\": \"general\",\r\n                                    \"display\": \"общая анестезия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ProcedureUrgency\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/ProcedureUrgency\",\r\n                                    \"code\": \"planned\",\r\n                                    \"display\": \"Плановое\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"13522\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ProcedureType\",\r\n                                \"code\": \"non-oncological-diseases\",\r\n                                \"display\": \"По поводу неонкологических заболеваний\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/SurgicalInterventions\",\r\n                            \"code\": \"JFSA15\",\r\n                            \"display\": \"Эндоскопическая полипэктомия в толстой кишке\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"Эндоскопическая полипэктомия в толстой кишке\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"occurrencePeriod\": {\r\n                    \"start\": \"2025-11-15T12:00:00Z\",\r\n                    \"end\": \"2025-11-15T13:20:00Z\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"endo\",\r\n                                    \"display\": \"врач-эндоскопист\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        },\r\n                        \"period\": {\r\n                            \"start\": \"2025-11-15T12:00:00Z\",\r\n                            \"end\": \"2025-11-15T13:20:00Z\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"surgical-sister\",\r\n                                    \"display\": \"медицинская сестра операционная\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        },\r\n                        \"period\": {\r\n                            \"start\": \"2025-11-15T12:00:00Z\",\r\n                            \"end\": \"2025-11-15T13:20:00Z\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"anesthetist\",\r\n                                    \"display\": \"врач-анестезиолог-реаниматолог\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        },\r\n                        \"period\": {\r\n                            \"start\": \"2025-11-15T12:00:00Z\",\r\n                            \"end\": \"2025-11-15T13:20:00Z\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"function\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OperatingTeam\",\r\n                                    \"code\": \"anesthetist-sister\",\r\n                                    \"display\": \"медицинская сестра-анестезист\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        },\r\n                        \"period\": {\r\n                            \"start\": \"2025-11-15T12:00:00Z\",\r\n                            \"end\": \"2025-11-15T13:20:00Z\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"location\": {\r\n                    \"reference\": \"Location/{{LocationId}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"concept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SurgicalInterventionDiagnosis\",\r\n                                    \"code\": \"postoperative\",\r\n                                    \"display\": \"Диагноз после вмешательства\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/ExampleDiagnosisrEndoscopy3\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"note\": [\r\n                    {\r\n                        \"text\": \"Колоноскоп введен до купола слепой кишки, осмотр выполнен по ходу вывода аппарата.\\n               В нисходящей ободочной кишке визуализирован полип на ножке, выполнена его эндоскопическая \\n               резекция с помощью диатермической петли. \\n               Слизистая остальных отделов толстой кишки без выраженной патологии.\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Bundle",
								"$import"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод получения статуса операции импорта пакета медицинской информации",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Bundle",
								"{{bundleId}}",
								"$status"
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия у пациента процедур эндоскопического исследования",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Procedure?_profile=https://fhir.by/StructureDefinition/SurgicalProcedure&patient={{patientId}}",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Patient",
								"{{patientId}}",
								"Procedure"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/SurgicalProcedure"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия ресурсов госпитализации",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let episodOfCareId = jsonData.entry.find(obj => obj.resource.resourceType === \"EpisodeOfCare\").resource.id;\r",
									"\r",
									"pm.collectionVariables.set(\"episodOfCareId\", episodOfCareId);\r",
									"console.log(episodOfCareId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/EpisodeOfCare?_profile=https://fhir.by/StructureDefinition/Hospitalisation&patient={{patientId}}&_sort=-_lastUpdated",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Patient",
								"{{patientId}}",
								"EpisodeOfCare"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/Hospitalisation"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								},
								{
									"key": "_sort",
									"value": "-_lastUpdated"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия у пациента направления на исследование образца",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let resourceId = jsonData.entry.find(obj => obj.resource.resourceType === \"ServiceRequest\").resource.id;\r",
									"\r",
									"pm.collectionVariables.set(\"serviceRequestResearchId\", resourceId);\r",
									"console.log(resourceId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ServiceRequest?_profile=https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch&patient={{patientId}}",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Patient",
								"{{patientId}}",
								"ServiceRequest"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/ServiceRequestBioMatResearch"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "Метод проверки наличия образца",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"var jsonData = pm.response.json();\r",
									"let resourceId = jsonData.entry.find(obj => obj.resource.resourceType === \"Specimen\").resource.id;\r",
									"\r",
									"pm.collectionVariables.set(\"specimenId\", resourceId);\r",
									"console.log(resourceId)\r",
									""
								],
								"type": "text/javascript",
								"packages": {},
								"requests": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Specimen?_profile=https://fhir.by/StructureDefinition/BioMatSpecimen&patient={{patientId}}",
							"protocol": "{{Schema}}",
							"host": [
								"{{Proxy-host}}"
							],
							"path": [
								"fhir",
								"Patient",
								"{{patientId}}",
								"Specimen"
							],
							"query": [
								{
									"key": "_profile",
									"value": "https://fhir.by/StructureDefinition/BioMatSpecimen"
								},
								{
									"key": "patient",
									"value": "{{patientId}}"
								}
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"auth": {
		"type": "oauth2",
		"oauth2": [
			{
				"key": "useBrowser",
				"value": true,
				"type": "boolean"
			},
			{
				"key": "clientId",
				"value": "mis_agsr_web_application",
				"type": "string"
			},
			{
				"key": "accessTokenUrl",
				"value": "https://pp.cisz.by/auth/api/realms/iehr/token",
				"type": "string"
			},
			{
				"key": "authUrl",
				"value": "https://pp.cisz.by/auth/api/realms/iehr/auth",
				"type": "string"
			},
			{
				"key": "tokenName",
				"value": "iehr",
				"type": "string"
			},
			{
				"key": "refreshRequestParams",
				"value": [],
				"type": "any"
			},
			{
				"key": "tokenRequestParams",
				"value": [
					{
						"key": "Origin",
						"value": "https://oauth.pstmn.io/v1/callback",
						"enabled": true,
						"send_as": "request_header"
					}
				],
				"type": "any"
			},
			{
				"key": "authRequestParams",
				"value": [],
				"type": "any"
			},
			{
				"key": "challengeAlgorithm",
				"value": "S256",
				"type": "string"
			},
			{
				"key": "redirect_uri",
				"value": "https://oauth.pstmn.io/v1/callback",
				"type": "string"
			},
			{
				"key": "grant_type",
				"value": "authorization_code_with_pkce",
				"type": "string"
			},
			{
				"key": "addTokenTo",
				"value": "header",
				"type": "string"
			},
			{
				"key": "client_authentication",
				"value": "body",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"requests": {},
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"requests": {},
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "patientId",
			"value": ""
		},
		{
			"key": "episodOfCareId",
			"value": ""
		},
		{
			"key": "bundleId",
			"value": ""
		},
		{
			"key": "StatusUrl",
			"value": ""
		},
		{
			"key": "preliminaryCondition",
			"value": "",
			"type": "default"
		},
		{
			"key": "serviceRequestResearchId",
			"value": ""
		},
		{
			"key": "specimenId",
			"value": ""
		},
		{
			"key": "EpisodeOfCareId",
			"value": "",
			"type": "default"
		},
		{
			"key": "ProcedureId",
			"value": ""
		}
	]
}